Week 1 — Set Theory, Relations and Functions
1. Number Systems
Mathematics uses different sets of numbers for different purposes.
1.1 Natural Numbers
The natural numbers are:
IITM convention: is considered a natural number in this course.
Important properties
- is even.
- is neither prime nor composite.
- Natural numbers are closed under addition and multiplication.
1.2 Integers
The set of integers is:
Every natural number is an integer:
1.3 Rational Numbers
A rational number can be expressed as:
where
The set of rational numbers is denoted by:
Examples:
1.4 Irrational Numbers
An irrational number cannot be expressed as a ratio of two integers.
Examples:
1.5 Real Numbers
The real numbers consist of both rational and irrational numbers:
The number systems form the hierarchy:
2. Basic Properties of Numbers
2.1 Even Numbers
An integer is even if:
for some .
Examples:
2.2 Odd Numbers
An integer is odd if:
for some .
Examples:
2.3 Prime Numbers
A prime number is a natural number greater than having exactly two positive factors:
Examples:
Important:
2.4 Composite Numbers
A natural number greater than that is not prime is composite.
Examples:
Thus:
are neither prime nor composite.
3. Sets
A set is a collection of distinct objects.
The objects inside a set are called elements or members.
Example:
Here:
but:
4. Representing Sets
4.1 Roster Form
List all elements explicitly.
4.2 Set-Builder Form
Describe the property satisfied by the elements.
4.3 Empty Set
A set containing no elements is called the empty set.
Notation:
or
5. Subsets
Set is a subset of if every element of is also an element of .
Notation:
Example:
Therefore:
Every set is a subset of itself:
The empty set is a subset of every set:
6. Proper Subsets
If:
and:
then is a proper subset of .
Notation:
7. Cardinality
The cardinality of a finite set is the number of elements it contains.
If:
then:
8. Set Operations
Let:
and:
8.1 Union
The union contains elements belonging to either set.
8.2 Intersection
The intersection contains elements common to both sets.
8.3 Difference
The difference contains elements in but not in .
Similarly:
8.4 Complement
If is the universal set, the complement of is:
It contains all elements of that are not in .
9. Important Set Identities
Commutative Laws
Associative Laws
Distributive Laws
De Morgan's Laws
Identity Laws
Complement Laws
10. Cardinality of Sets
For two finite sets:
If and are disjoint:
then:
11. Cartesian Product
The Cartesian product of and is:
Example:
Then:
If:
then:
12. Relations
A relation from to is a subset of the Cartesian product:
For example:
and:
is a relation on .
13. Types of Relations
For a relation on a set :
13.1 Reflexive
is reflexive if:
for every:
13.2 Symmetric
is symmetric if:
13.3 Antisymmetric
is antisymmetric if:
implies:
13.4 Transitive
is transitive if:
implies:
14. Functions
A function is a special type of relation.
A function:
assigns exactly one element of to every element of .
We write:
15. Domain, Codomain and Range
For:
Domain
The set is the domain.
Codomain
The set is the codomain.
Range
The range is the set of values actually produced by the function.
Important:
The range and codomain are not necessarily the same.
16. Determining the Domain
For a real-valued function, expressions must be defined over the domain.
Square root
For:
we require:
Therefore:
Hence:
and because the positive square root is used:
Denominator
For:
we require:
Therefore:
17. Injective Functions
A function is injective (one-to-one) if different inputs always produce different outputs.
Formally:
Equivalent form:
Example:
is injective over .
18. Surjective Functions
A function:
is surjective if every element of is produced by at least one element of .
Formally:
Thus:
19. Bijective Functions
A function is bijective if it is both:
- injective, and
- surjective.
Therefore:
A bijective function has a unique inverse function.
20. Many-to-One Functions
A function is many-to-one when multiple inputs can produce the same output.
For example:
because:
and:
Therefore, is not injective over .
21. One-to-One and Onto: Quick Test
| Property | Question to ask |
|---|---|
| Function | Does every input have exactly one output? |
| Injective | Can two different inputs have the same output? |
| Surjective | Does every codomain value get hit? |
| Bijective | Is it both injective and surjective? |
22. Composition of Functions
Given:
and:
their composition is:
The function is evaluated first.
In general:
23. Identity Function
The identity function is:
For a function with an inverse:
and:
24. Inverse Functions
A function has an inverse if it is bijective between the relevant domain and codomain.
The inverse is written:
and satisfies:
and: